package com.car.loan.project.ve.domain.vo;

import com.car.loan.project.cd.util.enums.CreditStatus;
import com.car.loan.project.ve.util.enums.VehicleStatus;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author huangding
 * @description
 * @date 2019/10/30 19:34
 */
@Data
public class VehicleEvaluationBaseVo {


    private Long id;

    /**
     * 单据编号
     */
    @ApiModelProperty("单据编号")
    private String no;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("业务员名称")
    private String adminName;

    /**
     * 1=待提交  5=已提交|待录入  10=已录入
     */
    @ApiModelProperty("(申请显示)1=待提交  5=已提交|(录入显示)待录入  10=已录入  15退回")
    private Integer status;

    @ApiModelProperty("申请状态")
    private String applyStatus;

    @ApiModelProperty("录入状态")
    private String inputStatus;

    @ApiModelProperty("车辆品牌")
    private String carBrand;

    @ApiModelProperty("车系型号")
    private String carSeries;

    /**
     * 评估价
     */
    @ApiModelProperty("评估价")
    private Double evaluationPrice;

    /**
     * 首次登记日期
     */
    @ApiModelProperty("首次登记日期")
    private String firstRegistDate;

    @ApiModelProperty("车架号")
    private String frameNo;


    /**
     * 评估日期
     */
    @ApiModelProperty("评估日期 ")
    private String evaluationDate;



    public String getApplyStatus() {
        if (VehicleStatus.INIT.status == this.status) {
            this.applyStatus = "待提交";
        } else if (VehicleStatus.SUBMIT.status == this.status) {
            this.applyStatus = "已提交";
        } else if (VehicleStatus.REVOKE.status == this.status) {
            this.applyStatus = "退回";
        } else {
            this.applyStatus = "已完成";
        }
        return this.applyStatus;
    }

    public String getInputStatus() {
        if (VehicleStatus.SUBMIT.status == this.status) {
            this.inputStatus = "待录入";
        } else if (VehicleStatus.COMPLETE.status == this.status) {
            this.inputStatus = "已录入";
        }
        return this.inputStatus;
    }
}
